#ifndef _FINSH_USART_CFG_H
#define _FINSH_USART_CFG_H


#include "usmart.h"

typedef enum
{
	uart_ch1,
	uart_ch2,
	uart_ch3,
	
	uart_ch_nums,
}uart_chx_e;//channle

struct uart_configure
{
	uint32_t baud_rate;                 
	uint32_t word_length;               
	uint32_t stop_bits;                 
	uint32_t parity;                    
	uint32_t mode;                     
	uint32_t hw_flow_ctl;                 
	uint32_t over_sampling;
	
	uint16_t rx_size;
	uint16_t tx_size;
};


#define FINSH_PORT	uart_ch3

void finsh_uart_init(uart_chx_e chx,struct uart_configure cfg);
void finsh_uart_writes(uart_chx_e chx, uint8_t *ch,uint16_t size);
uint32_t finsh_uart_reads(uart_chx_e chx, uint8_t *rbuf,uint16_t size);
void finsh_poll(uint32_t poll_times);


#endif


